home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
off_09.zip
/
WRITER.OFF
< prev
next >
Wrap
Text File
|
1993-01-12
|
24KB
|
576 lines
%endcol 74
%startcol 10
%parindent 0
%header Introduction %right Page %pn
%footer V. Dimakopoulos %right %[O F F %] Writer's Manual
%defmacro off
%bold OFF %norm %endmacro
%defmacro off.
%bold OFF. %norm %endmacro
%defmacro off'
%bold OFF' %norm %endmacro
%defmacro reader
%bold OFF Reader's Guide %norm %endmacro
%defmacro title
%norm
%verb
%verb
%endmacro
%defmacro example
%begin verb
%bold Document OFF output
%norm %endmacro
%begin verb
-----------------------------------------------------------------------------
%bold __ ___ ___
/ \\ |__ |__
\\__/ | |
%norm
An Informal Documentation Formatter
-----------------------------------------------------------------------------
%revWRITER'S GUIDE%norm
%boldVassilis V. Dimakopoulos
--- Last Revision: January 1993 ---%norm
%end
%pageno 0 %hshow 1
%newpage
%fshow 1
%under %center QUICK OVERVIEW
%title
%off will do certain things for your documents, like
%list
%item format your paragraphs
%item center lines
%item put attributes on the screen (e.g. bold, reverse, etc.)
%item create lists of things
%endlist
Just write your document in any text editor without worrying for the
visual beauty of it. You only have to put some simple keywords in some
places that %off will understand later to
format your document. When finished just run %off on your file
and watch the result.
Consult the %reader %norm for %off's options.
%verb
%verb
%verb
%under %center STARTING
%title
Your document consists of paragraphs and commands. The commands
affect the appearance of paragraphs. A paragraph is a set of
contiguous lines that ends with a blank line. This means that a
blank line starts a new paragraph. The job of %off is basically
to format the paragraphs by adding/deleting spaces so that all lines
in a paragraph are both right and left indented by the same amount.
An example follows:
%example
As I was walking down As I was walking down the road
the road next next to my house I heard a
to voice:
my house I heard a voice:
"You started a new paragraph
"You started a new you stupid!"
paragraph you stupid!"
%end
All the commands that %off understands have the '\%' character in
front of them, e.g. '\%center', '\%macro'. Then the command name
follows, %under without %norm any space between the '\%' and the
command name. %bold A space before or after a command is optional. %norm
If you want to actually print the character '\%', precede it with a backslash
(\\). If want to print the backslash, precede it with another backslash
(or else it will be ignored):
%example
Some characters: \\\%, \\\\, \\\\\\\% Some characters: \%, \\, \\\%
%end
In most of the cases you won't need to use (m)any commands. For
example if you are writing a letter to somebody
then probably you just want %off to format your paragraphs
(instead of doing it by hand!) and nothing else.
In case you want to do fancy things (e.g. center some lines)
then you probably need to know some of the commands %off offers.
Tutorial sections for the commands follow and the complete list
is given for reference at the end of this document.
%header Attributes %right Page %pn
%newpage
%center %under ATTRIBUTES
%title
%off has 4 commands to control the appearance of text when displayed
or printed:
%center \%bold, \%norm, \%rev, \%under.
%under \%bold %norm makes text appear in bold style; %under \%rev %norm
makes text appear reversed (black characters on white background or vice
versa); %under \%under %norm produces underlined text; %under \%norm %norm
resets everything to normal.
%under NOTE: %norm When %off output is sent directly to a printer
(%bold -p %norm command line option,) then reversed characters actually
appear as %rev italics. %norm
%example
Different attributes: Different attributes:
\%bold bold \%rev reverse \%under %boldbold %revreverse%norm %underunderlined%norm
underlined %norm
%end
%header Line Control Commands %right Page %pn
%newpage
%center %under LINE CONTROL COMMANDS %norm
%title
You can tell %off to treat a line of text in a special way, using
the commands:
%center \%center, \%right, \%trio, \%verb.
%under \%center %norm will center a line; %under \%right %norm will flush a
line towards the right end of the screen; %under \%trio %norm will produce a
line consisting of 3 parts: a flushed-left, a centered and a flushed-right
part; %under \%verb %norm will produce a line preserving all the spaces you
typed (i.e. verbatim line, unlike lines inside paragraphs.)
When %off meets any of the above commands in your document, then it
will read the rest of the line and process it accordingly.
%example
Look at the following three lines, Look at the following three lines
that illustrate \\\%center, that illustrate \%center, \%right,
\\\%right, \\\%trio and \\\%verb. \%trio and \%verb.
\%center Centered Centered
\%right Flushed right Flushed right
\%trio L \%center C \%right R L C R
\%verb Lots of spaces ! Lots of spaces !
%end
As you can see in the last example, a \%trio line should be typed as
%center \%trio <left text> \%center <center text> \%right <right text>
to create the 3-part line. You can omit any of the 3 parts if you wish. For
example,
%center \%trio <left text> \%right <right text>
will produce a line with a left and a right part only.
Some things should be noted about the \%verb command:%nl
(a) it outputs spaces exactly as they appear in your document, even if these
spaces are preceded by a command. For example,
%center \%verb a \%bold b
will produce
%verb --> a %bold b%norm
while,
%center \%verb a\%boldb
will produce
%verb --> a%boldb%norm
So watch your spaces! %nl
(b) keep in mind that %bold the 1st space appearing after a \%verb command
is always ignored. %norm %nl
(c) no indentation exists for verbatim lines, i.e. output begins at column
0 always.
Inside a line that is to be formatted by the above commands, %off only
understands the %under \%bold, \%endcol, \%newpage, \%norm, \%rev,
\%startcol, \%under, \%[ and \%] %norm commands. The last two commands do
not make any sense inside a \%verb line, of course.
%nl
In the case you want to have many lines formatted by the above commands,
instead of typing the command name in the beginning of each line, you can
use the %under \%begin %norm command, as follows:
\%begin <command_name> %nl
... %nl
... (lines to be processed) %nl
... %nl
\%end
Do not forget the %under \%end %norm at the end!
%example
Here is a bunch of centered Here is a bunch of centered
lines, using the \\\%begin center lines, using the \%begin
command: center command:
\%begin center First line
First line Second line now
Second line now The last line
The last line
\%end
%end
You should keep in mind that whatever follows in the line of a
'\%begin <command_name>' or an '\%end' %bold is ignored. %norm
%header Lists %right Page %pn
%newpage
%center %under LISTS %norm
%title
%off can easily create lists of things, using the %under \%list %norm
command. A list consists of items and each item consists of paragraphs.
The items can be e